{include file="public/header" /}

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.adv_index_manage}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>所属分类</dt>
                <dd>
                    <select name="ap_id">
                        <option value="">{$Think.lang.ds_please_choose}...</option>
                        {foreach name="ap_list" item="ap_v"}
                        <option value="{$ap_v.ap_name}" {if condition="$Request.param.ap_id eq $ap_v.ap_id"}selected{/if}>
                        {if condition="($ap_v.ap_name==1)"}视频广告
                        {elseif condition="($ap_v.ap_name==2)"}商品促销
                        {elseif condition="($ap_v.ap_name==3)"}项目定制
                        {elseif condition="($ap_v.ap_name==4)"}文章类
                        {/if}
                        </option>
                        {/foreach}
                    </select>
                </dd>
            </dl>
            <div class="btn_group">
                <input type="submit" class="btn" value="{$Think.lang.ds_search}">
                {if $filtered}
                <a href="{:url('Adv/adv')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                {/if}
            </div>
        </div>
    </form>
    <div class="fixed-empty"></div>
    <form method="post" id="store_form">
        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th class="w300">轮播图名称</th>
                <th class="w300">所属分类</th>
                <th class="w200">{$Think.lang.adv_clicknum}</th>
                <th class="w200">宽（像素）</th>
                <th class="w200">高（像素）</th>
                <th class="w200">添加时间</th>
                <th class="align-center w200">{$Think.lang.ds_handle}</th>
            </tr>
            </thead>
            <tbody>
            {notempty name="adv_info"}
            {foreach name="adv_info" item="v"}
            <tr class="hover" >
                <td class="name">{$v.name}</td>
                <td>
                            {if condition="($v.ap_id==1)"}视频广告
                            {elseif condition="($v.ap_id==2)"}商品促销
                            {elseif condition="($v.ap_id==3)"}项目定制
                            {elseif condition="($v.ap_id==4)"}文章类
                            {/if}
                </td>
                <td>{$v.adv_clicknum|default='0'}</td>
                <td>{$v.width}</td>
                <td>{$v.height}</td>
                <td>{$v.time|date='Y-m-d H:i:s',###}</td>
                <td>
                    <a href="javascript:dsLayerOpen('{:url('Adv/rotation_edit',['adv_id'=>$v.id])}','{$Think.lang.ds_edit}-{$v.name}','1000px','700px')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
                    <a href="javascript:dsLayerConfirm('{:url('Adv/rotation_del',['adv_id'=>$v.id])}','{$Think.lang.ds_ensure_del}',{$v.id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="15">{$ap_name}{$Think.lang.ds_no_record}</td>
            </tr>
            {/notempty}
            </tbody>
        </table>
    </form>
</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>